<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>企业后台系统</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>

	<p>
		&nbsp;&nbsp;${sessionScope.adminTest.adminName}管理员欢迎你&nbsp;&nbsp;&nbsp;
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>企业后台系统，提供管理员新增，修改，删除，查找商品的功能</b>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
			href="${pageContext.request.contextPath}/customer/indexUI.action">返回首页</a>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		<a href="${pageContext.request.contextPath}/admin/orderShow.action">查看订单</a>
	</p>
	
	<form
		action="${pageContext.request.contextPath }/goods/insertGoods.action"
		method="post" enctype="multipart/form-data">
		<b>新增商品：</b>
		<table width="98%" border=1 cellpadding="0" cellspacing="0"
			align="center">
			<tr bgcolor="#CCFFFF">
				<td><b>商品品牌</b></td>
				<td><b>商品名称</b></td>
				<td><b>商品描述</b></td>
				<td><b>商品库存</b></td>
				<td><b>商品价格</b></td>
				<td><b>商品类型</b></td>
				<td><b>商品样图</b></td>
				<td><b>确认添加</b></td>
			</tr>
			<tr>
				<td><select name="goodsBrand">
						<option value="联想">联想</option>
						<option value="华硕">华硕</option>
						<option value="戴尔">戴尔</option>
						<option value="惠普">惠普</option>
				</select>
				</td>
				<td><input type="text" name="goodsName" placeholder="商品名称" />
				</td>
				<td><textarea rows="1" cols="45" name="goodsDescription"
						placeholder="商品描述"></textarea></td>
				<td><input type="text" name="goodsNumber" placeholder="商品库存" />
				</td>
				<td><input type="text" name="goodsPrice" placeholder="商品价格" />
				</td>

				<td><select name="goodsType">
						<option value="笔记本">笔记本</option>
						<option value="台式机">台式机</option>
						<option value="游戏本">游戏本</option>
						<option value="一体机">一体机</option>

				</select>
				</td>
				<td><input type="file" name="updateName"></td>
				<td><input type="submit" value="确认" />
				</td>
			</tr>
		</table>
	</form>
	<br />
	<br />
	<br />
	<p>
		<b>库存商品：</b>
	</p>
	<table width="98%" border=1 cellpadding="0" cellspacing="0"
		align="center">
		<tr bgcolor="#CCFFFF">
			<td><b>商品品牌</b></td>
			<td><b>商品名称</b></td>
			<td width="30%"><b>商品描述</b></td>
			<td><b>商品库存</b></td>
			<td><b>商品价格</b></td>
			<td><b>商品类型</b></td>
			<td width="10%"><b>商品样图</b></td>
			<td><b>更新日期</b></td>

			<td><b>选项</b></td>
		</tr>
		<c:forEach items="${sessionScope.goodsSearch }" var="goodsSearch"
			varStatus="status">
			<tr>
				<td>${goodsSearch.goodsBrand}</td>
				<td>${goodsSearch.goodsName}</td>
				<td>${goodsSearch.goodsDescription }</td>
				<td>${goodsSearch.goodsNumber }</td>
				<td>${goodsSearch.goodsPrice }</td>
				<td>${goodsSearch.goodsType }</td>
				<td align="center"><a href="#"><img width="60%"
						src="${goodsSearch.uploadLocation }${goodsSearch.uploadName }" />
				</a></td>
				<td>${goodsSearch.uploadTime}</td>
				<td><a
					href="${pageContext.request.contextPath}/admin/updateGoodsPage.action?id=${goodsSearch.goodsId}">
						修改 </a> &nbsp; <a
					href="${pageContext.request.contextPath}/admin/deleteGoods.action?id=${goodsSearch.goodsId}">
						删除 </a></td>
			</tr>
		</c:forEach>


	</table>


</body>
</html>